//
// Created by 相开原 on 2022/3/23.
//

#ifndef I_SHOP_UTILITY_H
#define I_SHOP_UTILITY_H

//跨平台头文件
#if _WIN32
#include <io.h>
#include <process.h>
#include <windows.h>
#elif __linux__
#include <sys/stat.h>
#include <unistd.h>
//#include <pthread.h>
#elif __APPLE__
#include <sys/stat.h>
#include <unistd.h>
#include <pthread.h>
#endif

#include <stdio.h>
#include <time.h>
#include <string.h>

#include "MD5.h"
#include "data.h"
#include "typedef.h"
#include "CLERK.h"

void background();

void setCheck();

void get_timeItem(struct time_item *dt);

int get_dayPassed(struct time_item start, struct time_item end);

void get_dateAfter(struct time_item start, int day, struct time_item *end);

void get_MD5(char *);

bool input_int(int *container, int MIN, int MAX);

bool input_double(double *container);

bool input_string(char container[], int maxLine);

bool isFileOK(char *);

void terminal(char *str, int font, int color, int background);

void system_clear();

void system_sleep(int);

void system_pause();

int folder(char *path);

char *priceMode_to_text(int mode);

char *fruitLevel_to_text(int mode);

int text_to_priceMode(char *text);

int text_to_fruitLevel(char *text);

#endif //I_SHOP_UTILITY_H
